* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #fff;
    --text-color: #333;
    --card-bg: white;
    --shadow: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg: #2d2d2d;
    --shadow: rgba(0,0,0,0.3);
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #007bff;
}

.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#about {
    margin-top: 60px;
    text-align: center;
    background-color: #f8f9fa;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow);
}

.progress-bar {
    background: #eee;
    height: 10px;
    border-radius: 5px;
    margin-top: 1rem;
}

.progress {
    background: #007bff;
    height: 100%;
    border-radius: 5px;
    transition: width 1s;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow);
    transition: transform 0.3s;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-5px);
}

.contact-info {
    text-align: center;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
}

/* 添加加载提示样式 */
.loading-complete {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: opacity 1s;
}

.project-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.project-links a {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
}

.tech-stack {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-stack span {
    background: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

[data-theme="dark"] .tech-stack span {
    background: #3d3d3d;
}

.calculator {
    width: 100%;
    max-width: 300px;
    margin: 1rem auto;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow);
}

.calculator-display {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

#display {
    font-size: 2rem;
    text-align: right;
    height: 40px;
    overflow: hidden;
    color: #333;
}

.calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem;
}

.calculator-keys button {
    padding: 0.8rem;
    font-size: 1.2rem;
    border: none;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calculator-keys button:hover {
    background: #f0f0f0;
}

.calculator-keys .operator {
    background: #e3f2fd;
    color: #1976d2;
}

.calculator-keys button[data-action="="] {
    background: #1976d2;
    color: white;
    grid-column: span 2;
}

[data-theme="dark"] .calculator-display {
    background: #2d2d2d;
}

[data-theme="dark"] #display {
    color: #f0f0f0;
}

[data-theme="dark"] .calculator-keys button {
    background: #3d3d3d;
    color: #f0f0f0;
}

[data-theme="dark"] .calculator-keys .operator {
    background: #1976d2;
    color: #fff;
}